﻿using System;
using System.Data;
using System.Collections.Generic;

namespace BaseServer.BRL
{
	public partial class Trial : JWFW.BOL.BaseConfigEntity
	{
		public Trial()
		{
			m_tableName = "t_trial";
			m_hasCode = true;
			m_tblCacheManager.IsEnable = true;
		}

		protected int m_toolID = 0;
		protected string m_regCode = string.Empty;
		protected DateTime m_endDate = DateTime.MinValue;
		protected string m_specialInfo = string.Empty;

		/// <summary>
		/// 工具ID
		/// </summary>
		public int ToolID
		{
			get { return m_toolID; }
			set { m_toolID = value; }
		}
		/// <summary>
		/// 注册码
		/// </summary>
		public string RegCode
		{
			get { return m_regCode; }
			set { m_regCode = value; }
		}
		/// <summary>
		/// 结束使用日期
		/// </summary>
		public DateTime EndDate
		{
			get { return m_endDate; }
			set { m_endDate = value; }
		}
		/// <summary>
		/// 额外信息
		/// </summary>
		public string SpecialInfo
		{
			get { return m_specialInfo; }
			set { m_specialInfo = value; }
		}

		protected override void FillContainer()
		{
			base.FillContainer();
			m_container.Add("toolID", m_toolID);
			m_container.Add("regCode", m_regCode);
			m_container.Add("endDate", m_endDate);
			m_container.Add("specialInfo", m_specialInfo);
		}

		public override bool GetProperties(System.Data.DataRow record)
		{
			if(!base.GetProperties(record))
			{
				return false;
			}
			m_toolID = this.GetIntValue(record, "toolID");
			m_regCode = this.GetStringValue(record, "regCode");
			m_endDate = this.GetDateValue(record, "endDate");
			m_specialInfo = this.GetStringValue(record, "specialInfo");
			return true;
		}

	}
}
